package com.hj.system.controller;


import com.hj.system.utils.ResponseUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import com.hj.system.service.UserService;
import com.hj.system.entity.base.UserEntity;
import org.springframework.web.bind.annotation.RestController;
import com.hj.system.controller.BaseController;

import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author wxf
 * @since 2021-04-02
 */
@RestController
@RequestMapping("/sys/user")
public class UserController extends BaseController<UserEntity, UserService> {
    @Autowired
    private UserService userService;

    @Override
    public UserService getBaseService() {
        return userService;
    }

    /**
     * 查询当前登录用户信息和权限信息
     */
    @GetMapping("/user/permission")
    public ResponseUtil queryUserPermissions() {
        UserEntity userEntity = userService.queryUserPermissions();
        return ResponseUtil.okContent(userEntity);
    }
}

